The embodiment relates to a lane correction apparatus, and more particularly, to a lane correction system which can correct abnormally varied lane information detected by a Lane Departure Warning System (LDWS), and a lane correction apparatus and a method of correcting a lane thereof.
Recently, as performance of computer hardware has been developed, computer vision and image processing technologies have been rapidly developed, so that high resolution video data can be analyzed and processed in real time.
Research and studies for applying such a computer vision to a vehicle have been actively done to reduce a traffic accident rate. In addition, research for an intelligent vehicle has been actively performed in connection with high-technology industry of 21st Century.
Further, interest in the image processing application in the general vehicle field as well as the intelligent vehicle field has been increased.
A vehicle black box, which has been recently released to market, includes an impact sensor and an image sensor and stores images taken before and after traffic accident occurs. The black box may be utilized as evidence for determining one's mistake. As the demand for the vehicle black box has been increased, providers have exerted an effort to additionally provide functions related to safety, such as a lane departure detection and warning, to the vehicle black box.
Meanwhile, vehicles are driven at high speed in well-paved lanes such as lanes in South Korea. For using the intelligent vehicle in real life, the process of exact computation is required without performance degradation at high driving speed. Thus, optimization of software algorithm has been requested as well as the development of hardware.
Many studies related to lane recognition have been pursued in the inside and the outside of the country. Typical schemes for recognizing a lane include a scheme of using the Hough transformation, a scheme of using a histogram, and a scheme of using edge connection information.
First, the scheme of using the Hough transformation is a normal lane detection scheme. The Hough transformation, which is generally used in the computer vision and image processing fields, detects an object which can be modeled by using a polynomial expression existing in an image. The Hough transformation may obtain an excellent result and represent a superior feature against noise.
According to a method applied to a lane recognition algorithm by utilizing a scheme of detecting a straight line using the Hough transformation, iterative binarization using an average value is performed based on the fact that a lane has a brightness value distinctly distinguished from that a road area in a rod image.
In order to detect a lane in a binarization image, the edges are detected by using the Sobel operator and thinning is performed for reducing an amount of Hough transformation calculations. Then, the pixel domain is converted into the parameter domain through the Hough transformation, so several candidate points for the straight lines are calculated near a coordinate in which a lane exists.
The pixels of the accumulated candidate points for the straight lines are added up and the maximum value thereof is detected to select one straight line on the pixel domain to recognize the lane.
Second, the scheme of recognizing a lane through a histogram calculates a histogram of a gray level in order to sense a lane in a road image. After forming a narrow horizontal band in the road image, the image is scanned from the bottom to the top thereof and calculates histograms of corresponding bands every scanning step for the thresholding to the maximum value. Thus, the lane is recognized by combining the band subject to the thresholding and the binary image includes all of the lanes and other objects.
Next, features are extracted from the binary image which is divided based on histograms, by using various information including an average angle in corporation with a vanishing point of each pixel of an object, a center of an object, a size of an object, a maximum width of an object, and a y-coordinate at which a maximum width and a maximum value of an object are located.
The extracted features are clearly classified through a decision tree and the candidates that finally remain are detected as the lane through a procedure of analyzing a relationship between the road and the lane.
Third, the scheme of recognizing a lane through edge connecting information uses a clustering scheme. According to the scheme of recognizing a lane through edge connecting information, the image information acquired through a camera is divided into a left image and a right image and then, clustering is performed by using edge pixels of the lane extracted through the Sobel operation.
The clustering procedure first selects an edge pixel serving as a starting point and designates ID. Then, a pixel of which the distance from the starting point to the pixel is less than the length of 2 pixels is found among edge pixels near the starting point as the edge pixel, and the same ID of that of the starting point is assigned to the found pixel. Each sub-pixel to which the ID is assigned becomes the starting point, so sub-pixels thereof are again found through the same scheme as described above.
If the edge pixel does not exist in the range of two pixels, another pixel to which any IDs are not assigned is found and then, after a new ID is assigned thereto, the same procedure as described above is repeated. If the clustering is completed, the minimum and maximum y values of each cluster and x-coordinate value corresponding to the y values are obtained. The two coordinate values are used to obtain straight line equations of each cluster and an extending line is calculated through the equations. In order to measure a distance between the clusters, two points about two y values which are equal to each other are calculated through the each cluster equation, thereby obtaining the difference with respect to the widths of lanes. The two clusters having minimum difference values are recognized as the lane.
However, since the above scheme of detecting a lane does not provide a function for correcting detected lane information, when a fault lane is detected, exact information cannot be provided to a user, so the user may feel inconvenienced.
That is, as described above, in a case of a lane departure warning system based on an image, the fault detection is instantly increased under some circumstances, such as abrasion of the lane, complex situation of a city or complex noise caused by a sign board.